#ifndef __STORMWIDGET_STORMWIDGET_UILIBRARY_CLISTELEMENTUI_LISTELEMENTUI_H
#define __STORMWIDGET_STORMWIDGET_UILIBRARY_CLISTELEMENTUI_LISTELEMENTUI_H

#include "ControlUI.h"
#include "IList.h"

class CListElementUI: public CControlUI, public IListItemUI
{
public:
	CListElementUI(void);
	virtual ~CListElementUI(void);
	UINT GetControlFlags() const;
	LPVOID GetInterface(LPCTSTR pstrName);

	int GetIndex() const;
	void SetIndex(int iIndex);

	void SetOwner(CControlUI* pOwner);

	bool IsSelected() const;
	bool Select(bool bSelect = true);
	bool IsExpanded() const;
	bool Expand(bool bExpand = true);

	bool Activate();

	void Event(TEventUI& event);
	void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);

protected:
	int m_iIndex;
	bool m_bSelected;
	IListOwnerUI* m_pOwner;
};

#endif //__STORMWIDGET_STORMWIDGET_UILIBRARY_CLISTELEMENTUI_LISTELEMENTUI_H
